/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.assignment2.student.undergrad;

import za.ac.cput.assignment2.student.Student;

/**
 *
 * @author yandiswa
 */
public class UnderGrad extends Student {
    public UnderGrad(){
        
    }
    
    public UnderGrad(String nm, String studNum,double loan){
        
        super(nm,studNum,loan);
        
    }
    public double interest(){
        return super.getLoanAmount()+(super.getLoanAmount() * 0.12);
    }
    public String toString()
    {
        return String.format("Name is : %s\n Student No is: %s\nloan before interest%.2f\nloan after interest is: %.2f",super.getName(),super.getStudNum(),super.getLoanAmount(),interest());
    }
}
